<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>查看留言</title>
<link type="text/css" href="${staticResources}/css/viewcomment.css" rel="stylesheet" />
</head>
<body style=" background: url('${staticResources}/image/greenbc.gif');">
<div id="header">
  <div id="hy">
    <c:if test="${user eq null }">
    <div id="logo">欢迎光临中国药科大学二手书交易平台!请<span><a href="${contextPath }/Account/Login">登录</a></span> 免费<span><a href="${contextPath }/Account/Register">注册</a></span></div>
    </c:if>
    <c:if test="${user ne null }">
    <div id="sc">
      <ul>
        <li><a href="${contextPath }/Account/Logout">注销</a></li>
        <li><a href="${contextPath }/Me?content=201">收藏夹</a></li>
        <li><a href="${contextPath }/Me">个人中心</a></li>
        <li>欢迎你，<b>${fn:escapeXml(user.nickName) }</b>！</li>
      </ul>
    </div>
    </c:if>
   </div>
   <div id="top" style=" background: url('${staticResources}/image/listcommentsbc_03.gif');">
      <div class="tx">
	    <dl>
	     <c:choose>
           <c:when test="${empty user.userPicture }">
             <img src="${staticResources}/image/userpics_none.jpg" width="132" height="132" alt="">
           </c:when>
           <c:otherwise>
             <img src="${userContents}/userpics/${user.userPicture }" width="132" height="132" alt="">
           </c:otherwise>
	     </c:choose>
	    </dl>
	  </div>
	  <div class="xx">
	     <dl class="nc">${fn:escapeXml(user.nickName)}</dl>
		 <dl class="degree">活跃度：${user.activityPoint}</dl>
		 <dl class="degree">信誉度：${user.creditPoint}</dl>
		 <dl class="degree">个性签名：${fn:escapeXml(user.signature)}</dl>
	  </div>
   </div>
 </div>
   <div id="nav" style=" background: url('${staticResources}/image/listcomments_07.gif');">
    <ul>
      <li><a href="${contextPath }/Homepage">首页</a></li>
      <li><a href="${contextPath }/Books/Search">交易广场</a></li>
      <li><a href="${contextPath }/Auctions/Search">拍卖中心</a></li>
      <li><a href="#">读者推荐</a></li>
      <li><a href="${contextPath }/Comment/ListComments">留言板</a></li>
      <li><a href="#">新手指南</a></li>
    </ul>
   </div>

<div id="divmiddle"  style=" background: url('${staticResources}/image/viewcomment_background2.jpg');"> 
  <p style="height:30px;"></p>
  <div id="divcomment">
    <div id="divcommentleft">
      <c:choose>
        <c:when test="${empty comment.commentUser.userPicture }">
          <img id="imgcomment" src="${staticResources}/image/userpics_none.jpg">
        </c:when>
        <c:otherwise>
          <img id="imgcomment" src="${userContents}/userpics/${comment.commentUser.userPicture }">
        </c:otherwise>
      </c:choose>
    </div>
    <div id="divcommentright">
      <div id="divcommentnickname">${fn:escapeXml(comment.commentUser.nickName)}</div>
      <div id="divcommenttitle">标题：${fn:escapeXml(comment.title)}</div>
      <div id="divcommentmassege">${fn:escapeXml(comment.content)}</div>
      <div id="divcondition">
    <div id="divstate">${fn:escapeXml(comment.commentState.friendlyName)}</div><div id="divtime">${fn:escapeXml(comment.formattedCommentTime)}</div>
    </div>
  </div>
  <c:if test="${!empty comment.replyContent }">
  <div id="divreply">
    <div id="divreplyleft">
      <c:choose>
        <c:when test="${empty comment.replyUser.userPicture }">
          <img id="imgreply" src="${staticResources}/image/userpics_none.jpg">
        </c:when>
        <c:otherwise>
          <img id="imgreply" src="${userContents}/userpics/${comment.replyUser.userPicture }">
        </c:otherwise>
      </c:choose>
    </div>
    <div id="divreplyright">
      <div id="divreplynickname">${fn:escapeXml(comment.replyUser.nickName)}</div>
      <div id="divreplymassege">${fn:escapeXml(comment.replyContent)}</div>
    </div>
    <div id="divreplytime">${fn:escapeXml(comment.formattedReplyTime)}</div>
  </div>
  </c:if>
  <div id="divdispose">
    <div id="divgocomment"><a href="SubmitComment"><img src="${staticResources}/image/viewcomment_1.png" /></a></div>
    <div id="divgobanck"><a href="ListComments"><img src="${staticResources}/image/viewcomment_2.png" /></a></div>
  </div>
 </div>
</div>

  <div class="bottom">中国药科大学版权所有</div>

</body>
</html>